/**
 * Created by hjqi on 2016/5/1.
 */
var config = require('../config/config').config;
var glfs = require('./glusterfs');
var cephfs = require('./cephRbd');
var _handle = undefined;

function getStorageHandle(){
    //return glfs first
    if(!_handle){
        if(config.storage.type === "ceph")
            _handle = new cephfs();
        else
            _handle = new glfs();
    }
    return _handle;
}

exports.getStorageHandle = getStorageHandle;